import 'package:flutter/material.dart';
//图片 icon

class ImageIconRoute extends StatefulWidget {
  @override
  _ImageIconRoute createState() => new _ImageIconRoute();
}

class _ImageIconRoute extends State<ImageIconRoute> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("图片和icon"),
      ),
      body: Center(
        child: Column(children: <Widget>[
          Image(
            image: AssetImage("images/logo.png"),
            width: 30.0,
            fit: BoxFit.fitWidth,
            alignment: Alignment.bottomLeft,
          ),
          Image(
            image: NetworkImage(
                "https://avatars2.githubusercontent.com/u/20411648?s=460&v=4"),
            width: 100.0,
            fit: BoxFit.fitWidth,
          ),
          Image(
            image: NetworkImage(
                "https://avatars2.githubusercontent.com/u/20411648?s=460&v=4"),
            width: 100.0,
            height: 50.0,
            fit: BoxFit.fill,
          ),
          Image(
            image: NetworkImage(
                "https://avatars2.githubusercontent.com/u/20411648?s=460&v=4"),
            width: 50.0,
            fit: BoxFit.cover,
          ),
          Row(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Icon(
                Icons.accessible,
                color: Colors.green,
              ),
              Icon(
                Icons.error,
                color: Colors.green,
              ),
              Icon(
                Icons.fingerprint,
                color: Colors.green,
              ),
            ],
          )
        ]),
      ),
    );
  }
}
